package com.example.allinone.homework08.fragment2;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.Query;
import com.example.allinone.homework08.User;

import java.util.List;

@Dao
public interface UserDao {
    @Insert
    void insert(User user) ;

    @Query("select * from user")
    List<User>getAll() ;

    @Query("select * from user where age >=:low and age<=:high")
    List<User>seachUserByAge(int low , int high) ;
}
